package com.che.libcommon.api.page;

import com.google.gson.annotations.SerializedName;
import java.util.List;

public class PageList<T> {

  @SerializedName("list")
  public List<T> list;


  @SerializedName(value = "pageInfo",alternate = {"pagination"})
  public PageInfo pageInfo;

  public static <T> PageList<T> copyPage(List<T> list,PageInfo pageInfo){
    PageList<T> ret = new PageList<T>();
    ret.list = list;
    ret.pageInfo = pageInfo;
    return ret;
  }


  static class PageInfo{
    @SerializedName(value = "curentePage",alternate = {"currentPage"})
    public int currentPage;

    @SerializedName("pageNum")
    public int pageNum;

    @SerializedName("pageSize")
    public int pageSize;

    @SerializedName("total")
    public int total;
  }
}
